import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../enum/identity_enum.dart';

class DnpIdentityCorrectDialog extends StatelessWidget {
  final IdentityType identityType;
  final VoidCallback? onNext;

  const DnpIdentityCorrectDialog(
      {super.key, required this.identityType, this.onNext});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.transparent,
      body: Center(
        child: Container(
          width: 309,
          height: 498,
          decoration: BoxDecoration(
            image: DecorationImage(
              image: AssetImage('assets/images/ic_identity_correct_bg.webp'),
              fit: BoxFit.fill,
            ),
          ),
          child: Column(
            children: [
              SizedBox(height: 66),
              Text(
                'Correct example',
                style: TextStyle(
                  fontSize: 16,
                  fontWeight: FontWeight.w600,
                  color: Color(0xFF252630),
                ),
              ),
              SizedBox(height: 8),
              Image.asset(
                identityType == IdentityType.FrontOfIDPhoto
                    ? "assets/images/ic_identity_photo_bg1.webp"
                    : "assets/images/ic_identity_facial_bg.webp",
                width: 237,
                height: 149,
                fit: BoxFit.fill,
              ),
              SizedBox(height: 14),
              Text(
                "Error sample",
                style: TextStyle(
                    fontSize: 14,
                    fontWeight: FontWeight.w500,
                    color: Color(0xFFABABAB)),
              ),
              SizedBox(height: 10),
              Row(
                children: [
                  const SizedBox(
                    width: 14,
                  ),
                  Image.asset(
                    identityType == IdentityType.FrontOfIDPhoto
                        ? "assets/images/ic_identity_front_id_error1.webp"
                        : "assets/images/ic_identity_facial_error1.webp",
                    width: 80,
                    height: 68,
                    fit: BoxFit.fill,
                  ),
                  Spacer(),
                  Image.asset(
                    identityType == IdentityType.FrontOfIDPhoto
                        ? "assets/images/ic_identity_front_id_error2.webp"
                        : "assets/images/ic_identity_facial_error2.webp",
                    width: 80,
                    height: 68,
                    fit: BoxFit.fill,
                  ),
                  Spacer(),
                  Image.asset(
                    identityType == IdentityType.FrontOfIDPhoto
                        ? "assets/images/ic_identity_front_id_error3.webp"
                        : "assets/images/ic_identity_facial_error3.webp",
                    width: 80,
                    height: 68,
                    fit: BoxFit.fill,
                  ),
                  const SizedBox(
                    width: 27,
                  ),
                ],
              ),
              Row(children: [
                const SizedBox(
                  width: 14,
                ),
                Expanded(
                  child: Text(
                    "*Please submit the certification according to the sample to avoid blurring, obstructions and reflections",
                    style: TextStyle(
                      fontSize: 12,
                      fontWeight: FontWeight.w400,
                      color: Color(0xFFF14343),
                    ),
                  ),
                ),
                const SizedBox(
                  width: 27,
                ),
              ]),
              SizedBox(height: 14),
              Row(
                children: [
                  const SizedBox(
                    width: 14,
                  ),
                  Expanded(
                      child: GestureDetector(
                    behavior: HitTestBehavior.translucent,
                    onTap: () {
                      Get.back();
                    },
                    child: Container(
                      width: double.infinity,
                      height: 48,
                      alignment: Alignment.center,
                      decoration: BoxDecoration(
                        color: Color(0xFFCFE6FF),
                        borderRadius: BorderRadius.circular(16),
                      ),
                      child: Text(
                        "Back",
                        style: TextStyle(
                          fontSize: 16,
                          fontWeight: FontWeight.w600,
                          color: Color(0xFF95A5B9),
                        ),
                      ),
                    ),
                  )),
                  const SizedBox(
                    width: 9,
                  ),
                  Expanded(
                      child: GestureDetector(
                    behavior: HitTestBehavior.translucent,
                    onTap: () {
                      onNext?.call();
                      Get.back();
                    },
                    child: Container(
                      width: double.infinity,
                      height: 48,
                      alignment: Alignment.center,
                      decoration: BoxDecoration(
                        color: Color(0xFF1D4AC8),
                        borderRadius: BorderRadius.circular(16),
                      ),
                      child: Text(
                        "Next",
                        style: TextStyle(
                          fontSize: 16,
                          fontWeight: FontWeight.w600,
                          color: Colors.white,
                        ),
                      ),
                    ),
                  )),
                  const SizedBox(
                    width: 27,
                  ),
                ],
              )
            ],
          ),
        ),
      ),
    );
  }
}
